import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  build: {
    minify: false, // 禁用压缩,
    rollupOptions: {
      input: {
        index: path.resolve(__dirname, "index.html"),
        background: "src/background.js",
        content: "src/content.js",
        detail: "src/detail.js",
        chat: "src/chat.js",
      },
      output: {
        entryFileNames: `[name].js`,
        assetFileNames: `[name].[ext]`,
        chunkFileNames: `[name].js`,
      },
    },
  },
});
